//
//  XLTempViewController.swift
//  SinaProjectTest
//
//  Created by zhanghaifeng on 16/10/22.
//  Copyright © 2016年 BBSWaitting. All rights reserved.
//

import UIKit

class XLTempViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        setupUI()
    }
    
    // MARK: 监听事件
    @objc private func pushClick(){
        let tmpVc = XLTempViewController()
        navigationController?.pushViewController(tmpVc, animated: true)
    }
    // MARK: 设置视图
    private func setupUI(){
        view.backgroundColor = UIColor.white
        setupNav()
        
    }
    
    // MARK: 设置导航
    private func setupNav(){
        navigationItem.rightBarButtonItem = UIBarButtonItem(setHighLightImageName: nil, title: "PUSH", target: self, action: #selector(pushClick))
        navigationItem.title = "是\(navigationController?.childViewControllers.count ?? 0)个控制器"
    }

}
